package com.lawrence.dao;

import com.lawrence.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    List<User> selectAll();

    @Select("select * from user where id=#{id}")
    User delectOne(@Param("id") int id);

    int insertUser(User user);

    int updateUser(User user);

    int deleteUser(int id);

//    动态sql
    List<User> findAll();

}
